home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / awe2-0_1.lha / awe2-0.1 / Src / RCS / AwesimeHeap.h,v < prev    next >
Text File  |  1989-02-23  |  2KB  |  121 lines

  1. head     3.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    grunwald:3.2; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 3.2
  10. date     89.02.20.15.32.02;  author grunwald;  state Exp;
  11. branches ;
  12. next     3.1;
  13.  
  14. 3.1
  15. date     88.12.20.13.49.31;  author grunwald;  state Exp;
  16. branches ;
  17. next     1.2;
  18.  
  19. 1.2
  20. date     88.10.30.13.05.32;  author grunwald;  state Exp;
  21. branches ;
  22. next     1.1;
  23.  
  24. 1.1
  25. date     88.09.18.16.42.02;  author grunwald;  state Exp;
  26. branches ;
  27. next     ;
  28.  
  29.  
  30. desc
  31. @@
  32.  
  33.  
  34. 3.2
  35. log
  36. @Start using Gnu library heaps for schedulers
  37. @
  38. text
  39. @// This may look like C code, but it is really -*- C++ -*-
  40. // 
  41. // Copyright (C) 1988 University of Illinois, Urbana, Illinois
  42. //
  43. // written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
  44. //
  45. #ifndef AWESIMEHEAP
  46. #define AWESIMEHEAP
  47.  
  48. #define HEAP_NAME AwesimeHeap
  49. #define HEAP_KEY double
  50.  
  51. #include "Awesime.h"
  52.  
  53. class AwesimeHeapItem {
  54.     Awesime *pPtr;
  55.     double pKey;
  56. public:
  57.     AwesimeHeapItem();
  58.     AwesimeHeapItem(double key, Awesime *p);
  59.     operator<=(AwesimeHeapItem &p);
  60.     Awesime *ptr();
  61.     double key();
  62. };
  63.  
  64. inline Awesime*
  65. AwesimeHeapItem::ptr()
  66. {
  67.     return(pPtr);
  68. }
  69.  
  70. inline double
  71. AwesimeHeapItem::key()
  72. {
  73.     return(pKey);
  74. }
  75.  
  76. inline AwesimeHeapItem::AwesimeHeapItem()
  77. {
  78.     pPtr = 0; pKey = 0;
  79. }
  80.  
  81. inline AwesimeHeapItem::AwesimeHeapItem(double k, Awesime *p)
  82. {
  83.     pPtr = p; pKey = k;
  84. }
  85.  
  86. inline int AwesimeHeapItem::operator<=(AwesimeHeapItem &p)
  87. {
  88.     return ( pKey <= (p.key()) );
  89. }
  90.  
  91. #include "GenericHeap.h"
  92.  
  93. #endif
  94.  
  95. @
  96.  
  97.  
  98. 3.1
  99. log
  100. @Steay version
  101. @
  102. text
  103. @@
  104.  
  105.  
  106. 1.2
  107. log
  108. @*** empty log message ***
  109. @
  110. text
  111. @@
  112.  
  113.  
  114. 1.1
  115. log
  116. @Initial revision
  117. @
  118. text
  119. @d1 6
  120. @
  121.